<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${product.name} - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="JFinalShop Team" />
<meta name="Copyright" content="JFinalShop" />
<%if (product.metaKeywords! != ""){%><meta name="keywords" content="${product.metaKeywords}" /><%}%>
<%if (product.metaDescription! != ""){%><meta name="description" content="${product.metaDescription}" /><%}%>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<% include("/common/include.html"){}%>
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/product.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/product_content.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/product.js"></script>
<script type="text/javascript">
$().ready( function() {
	
	// 添加商品浏览记录
	$.addProductHistory("<%if (strutil.length(product.name!) <= 15){%>${product.name}<%}else{%>${strutil.subStringTo(product.name,0,11)}...<%}%>", "${base}${product.htmlFilePath}");

})
</script>
</head>
<body class="productContent">
	<div id="addCartItemTip" class="addCartItemTip">
		<div class="top">
			<div class="tipClose addCartItemTipClose"></div>
		</div>
		<div class="middle">
			<p>
				<span id="addCartItemTipMessageIcon">&nbsp;</span>
				<span id="addCartItemTipMessage"></span>
			</p>
			<p id="addCartItemTipInfo" class="red"></p>
			<input type="button" class="formButton tipClose" value="继续购物" hidefocus="true" />
			<input type="button" class="formButton" onclick="location.href='${base}/shop/cartItem/list'" value="进入购物车" hidefocus="true" />
		</div>
		<div class="bottom"></div>
	</div>
	<%include("/shop/header.html"){}%>
	<div class="body">
		<div class="bodyLeft">
			<div class="productCategory">
            	<div class="top">商品分类</div>
            	<div class="middle clearfix">
            		<ul class="menu">
            			<%for(list in rootProductCategoryList){%>
            				<li class="mainCategory">
								<a href="${base}/shop/product/list?id=${list.id}">${list.name}</a>
							</li>
							<%var childrenList = list.children;%>
							<%if (childrenList != null && childrenList.~size > 0){%>
								<%for(c1_List in childrenList){%>
									<li>
										<a href="${base}/shop/product/list?id=${c1_List.id}"><span class="icon">&nbsp;</span>${c1_List.name}</a>
										<%var childrenList2 = c1_List.children;%>
										<%if (childrenList2 != null && childrenList2.~size > 0){%>
											<ul>
												<%for(c2_List in childrenList2){%>
													<li>
														<%if (strutil.length(c2_List.name) < 15){%>
															<a href="${base}/shop/product/list?id=${c2_List.id}"><span class="icon">&nbsp;</span>${c2_List.name}</a>
														<%}else{%>
															<a href="${base}/shop/product/list?id=${c2_List.id}"><span class="icon">&nbsp;</span>${strutil.subStringTo(c2_List.name,0,11)}...</a>
														<%}%>
													</li>
												<%}%>
											</ul>
										<%}%>
									</li>
									<%if (c1_ListLP.index == 5){%>
										<%break;%>
									<%}%>
								<%}%>
							<%}%>
							<%if (listLP.index == 3){%>
								<%break;%>
							<%}%>
            			<%}%>
					</ul>
            	</div>
                <div class="bottom"></div>
			</div>
			<div class="blank"></div>
			<div class="hotProduct">
				<div class="top">热销排行</div>
				<div class="middle clearfix">
					<ul>
						<%for(list in hotProductList){%>
							<li class="number${listLP.index}">
								<%if (strutil.length(list.name) < 15){%>
									<span class="icon">&nbsp;</span><a href="${base}${list.htmlFilePath}" title="${list.name}">${list.name}</a>
								<%}else{%>
									<span class="icon">&nbsp;</span><a href="${base}${list.htmlFilePath}" title="${list.name}">${strutil.subStringTo(list.name,0,11)}...</a>
								<%}%>
							</li>
							<%if (listLP.index == 10){%>
								<%break;%>
							<%}%>
						<%}%>
					</ul>
				</div>
				<div class="bottom"></div>
			</div>
			<div class="blank"></div>
			<div class="productHistory">
				<div class="top">浏览记录</div>
				<div class="middle clearfix">
					<ul id="productHistoryListDetail"></ul>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="bodyRight">
			<div class="listBar">
				<div class="left"></div>
				<div class="middle">
					<div class="path">
						<a href="${base}/" class="home"><span class="icon">&nbsp;</span>首页</a>>
						<%for(list in pathList){%>
							<a href="${base}/shop/product/list?id=${list.id}">${list.name}</a>>
						<%}%>
					</div>
				</div>
				<div class="right"></div>
			</div>
			<div class="blank"></div>
			<div class="productTop">
				<div class="productTopLeft">
					<div class="productImage">
	                	<%for(list in product.productImageList!){%>
	                		<a href="${base}${list.bigProductImagePath}" class="tabContent zoom<%if (listLP.index > 0){%> nonFirst<%}%>">
								<img src="${base}${list.smallProductImagePath}" />
							</a>
						<%}%>
						
						<%if (product.productImageList == null){%>
	            			<a href="${base}${systemConfig.defaultBigProductImagePath}" class="zoom">
								<img src="${base}${systemConfig.defaultSmallProductImagePath}" />
							</a>
	                	<%}%>
                	</div>
					<div class="thumbnailProductImage">
						<a class="prev browse" href="javascript:void(0);" hidefocus="true"></a>
						<div class="scrollable">
							<ul class="items productImageTab">
								<%if (product.productImageList == null){%>
									<li>
										<img src="${base}${systemConfig.defaultThumbnailProductImagePath}" />
									</li>
	                        	<%}%>
	                        	<%for(list in product.productImageList!){%>
									<li>
										<img src="${base}${list.thumbnailProductImagePath}" />
									</li>
								<%}%>
							</ul>
						</div>
						<a class="next browse" href="javascript:void(0);" hidefocus="true"></a>
					</div>
				</div>
				<div class="productTopRight">
					<h1>
						<%if (strutil.length(product.name) > 50){%>${strutil.subStringTo(product.name,0,45)}...<%}else{%>${product.name}<%}%>
					</h1>
					<ul class="productAttribute">
						<%var index = 1;%>
						<%for(list in product.productType.enabledProductAttributeList!){%>
							<%if (product.productAttributeMap != null){%>
	                    		<li>
	                    			<strong>${list.name}:</strong>
	                    			${product.productAttributeMap[list.id]}&nbsp;
	                            </li>
	                            <%if (index == 5){%>
									<%break;%>
								<%}%>
								<% index = index + 1; %>
							<%}%>
						<%}%>
                        <%if (product.productType.productAttributeList! != null && product.productType.productAttributeList.~size > 0){%>
                        	<li><a href="#productAttribute" id="moreProductAttribute">更多参数>></a></li>
                        <%}%>
					</ul>
					<div class="blank"></div>
					<div class="productInfo">
						<div class="left"></div>
						<div class="right">
							<div class="top">
								销 售 价：<span class="price">${product.price,priceCurrencyFormat}</span>
								市 场 价：<span class="marketPrice">${product.marketPrice,priceCurrencyFormat}</span>
							</div>
							<div class="bottom">
								<%if (product.weight > 0){%>
									重 量：<span class="weight">${product.weight} ${i18n("WeightUnit." + product.weightUnit)}</span>
								<%}%>
								<%if (product.point != 0){%>
									积 分：<span>${product.point}</span>
								<%}%>
							</div>
						</div>
					</div>
					<div class="blank"></div>
					<div class="productNumber">
						货号: <span>${product.productSn}</span>
                        ${"品牌: <span>" + product.brand.name! + "</span>"}
					</div>
					<div class="blank"></div>
					<div class="productBuy">
						<div class="buyCount">
							我要购买: <input type="text" id="quantity" value="1" /> 件
						</div>
						<%if (product.isOutOfStock){%>
							<input type="button" class="outOfStockButton" value="" hidefocus="true" />
						<%}else{%>
							<input type="button" class="addCartItemButton addCartItem {id: '${product.id}'}" value="" hidefocus="true" />
						<%}%>
                        <input type="button" class="addFavoriteButton addFavorite {id: '${product.id}'}" value="" hidefocus="true" />
					</div>
				</div>
			</div>
			<div class="blank"></div>
			<div class="productBottom">
				<ul class="productAttributeTab">
					<li>
						<a href="javascript:void(0);" class="current" hidefocus="true">商品介绍</a>
					</li>
					<li>
						<a href="javascript:void(0);" name="productAttribute" hidefocus="true">规格参数</a>
					</li>
				</ul>
				<div class="tabContent productDescription">
					${product.description}
				</div>
				<div class="tabContent productAttribute">
					<table class="productAttributeTable">
						<%for(list in product.productType.enabledProductAttributeList!){%>
							<%if (product.productAttributeMap != null){%>
								<tr>
									<th>${list.name}</th>
									<td>
										${product.productAttributeMap[list.id]}&nbsp;
									</td>
								</tr>
							<%}%>
						<%}%>
					</table>
				</div>
			</div>
		</div>
		<div class="blank"></div>
		<%include("/shop/friend_link.html"){}%>
	</div>
	<div class="blank"></div>
	<%include("/shop/footer.html"){}%>
</body>
</html>